package Practice;

import java.util.Scanner;

public class HappyJump {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        for (int j = 1; j < n; j++) {
            int x =Math.abs(arr[j] - arr[j-1]);
            if (x<1 || x>n-1){
                System.out.println("Not jolly");
                return;
            }
        }
        System.out.println("Jolly");
    }
}
